<template>
  <!-- <div class="page-home"> -->
  <!-- 测试指令基本用法 -->
  <!-- <input class="ts" type="text" v-lazys="1" /> -->
  <!-- <div class="home-entry"> -->
  <div class="container">
    <!-- 左侧分类 -->
    <HomeCategory />
    <!-- banner轮播图 -->
    <HomeBanner />
    <!-- 新鲜好物 -->
    <!-- <HomePanel title="新鲜好物" subTitle="新鲜出炉 品质靠谱">
          <p>内容</p>
          <template #right>
            <XtxMore path="/login" />
          </template>
        </HomePanel> -->
    <HomeNew />
    <!-- 人气推荐 -->
    <HomeHot />
    <!-- 商品展示 -->
    <HomeProduct />
  </div>
  <!-- </div>
  </div> -->
</template>
<script>
import HomeCategory from './components/home-category'
import HomeBanner from './components/home-banner'
// import HomePanel from './components/home-panel.vue'
import HomeNew from './components/home-new.vue'
import HomeHot from './components/home-hot'
import HomeProduct from './components/home-product'
import { getCurrentInstance, onMounted } from 'vue'
export default {
  name: 'PageHome',
  components: { HomeCategory, HomeBanner, HomeNew, HomeHot, HomeProduct },
  data () {
    return {
      meng: '猫爷'
    }
  },
  setup (props, ct) {
    const instacne = getCurrentInstance()
    console.log('home:', ct)
    onMounted(() => {
      // 获取不到data变量和全局属性
      console.log('当前组件实例：', instacne.appContext.config.globalProperties)
    })
  },
  created () {
    console.log('hone:', this.load)
  }
}
</script>
<style lang="less" scoped>
// 测试less自动引入
// @import "~@/styles/variable.less"; // 借助插件后不需要手动引入了
.ts {
  border: 2px solid @priceColor;
}
</style>
